<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStationDimensionalityPatrolReportsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('station_dimensionality_patrol_reports', function (Blueprint $table) {
            $table->increments('id');
			$table->unsignedInteger('company_id')->index()->comment('公司ID');
            $table->unsignedInteger('project_id')->index()->comment('项目ID');
            $table->unsignedInteger('station_id')->index()->comment('岗位ID');
            $table->string('station_name')->comment('岗位名称');
            $table->string('genre_name')->comment('班次名称');
			$table->unsignedInteger('actual_quantity')->comment('实报岗数');
			$table->unsignedInteger('unreport_count')->comment('未报岗数');
			$table->unsignedInteger('finish_rate')->comment('完成率');
			$table->date('date')->index()->comment('日期');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('station_dimensionality_patrol_reports');
    }
}
